package com.hbpa.pan.server.modules.user.po;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author: BlcakTiger
 * @date: 2023/10/23 9:57
 * @contact: hsf6661@163.com
 * @description:
 */
@Data
@ApiModel(value = "用户登录参数")
public class UserLoginPO implements Serializable {

    private static final long serialVersionUID = 174392073414466489L;

    @ApiModelProperty(value = "用户名",required = true)
    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^[0-9A-Za-z]{6,16}$",message = "请输入6-16位只包含字母和数字的用户名")
    private String username;

    @ApiModelProperty(value = "密码",required = true)
    @NotBlank(message = "密码名不能为空")
    @Length(min = 8,max = 16,message = "请输入8-16位密码")
    private String password;
}
